// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: wsfuyibing <682805@qq.com>
// Date: 2025-02-10

package api

type (
    GetGoodsListResponse struct {
        Response
        Info *GetGoodsListInfoResponse `json:"info"`
    }
    GetGoodsListInfoResponse struct {
        Data  []*GetGoodsListDataResponse `json:"data"`
        Total int64                       `json:"total"`
    }
    GetGoodsListDataResponse struct {
        Id        int    `json:"id" label:"商品ID"`
        Name      string `json:"name" label:"商品名称"`
        Code      string `json:"number" label:"商品编号" desc:"此编号用于关联ERP与商城的商品关系"`
        Tax       any    `json:"tax" label:"税率"`
        Warehouse any    `json:"warehouse" label:"默认仓库"`
    }
)

func NewGetGoodsListResponse() *GetGoodsListResponse {
    return &GetGoodsListResponse{}
}
